﻿using UnityEngine;
using System.Collections;

public class EnemySpawnPoint : MonoBehaviour {

	// Use this for initialization
	
	public GameObject[] inimigos = new GameObject[1];
	
	void Start () {
		//Debug.Log(inimigos.Length);
		
		float chance = 100/inimigos.Length;
		int rand = Random.Range(0,100);
		
		for(int i=0; i<inimigos.Length; i++){
			
			if(rand <= chance){
				Instantiate(inimigos[i], this.transform.position, inimigos[i].transform.rotation);
				return;
			}else{
				chance = chance + chance;
			}
		}
	}
	
	// Update is called once per frame
	//void Update () {
	//}
}
